package com.futu.kafka;

import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.stereotype.Service;

@Service
public class ListensKafka {



    @KafkaListener(topics = "temperature", groupId = "temperature-group")
    public void listen(String message) {
        System.out.println("已接收温度: " + message);
    }



}
